﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogicLayer;

namespace inzWeb
{
    public partial class lastminute : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                uzupelnijSzczegoly();

            }
        }

        private void uzupelnijSzczegoly()
        {
            HotelBL hotelBL = new HotelBL();
            dgListaHoteleLastMinute.DataSource = hotelBL.pobierzListeZTerminem();
            this.DataBind();
        }

        public void dgListaHotele_page(Object sender, DataGridPageChangedEventArgs e)
        {
            dgListaHoteleLastMinute.CurrentPageIndex = e.NewPageIndex;
            uzupelnijSzczegoly();

        }
    }
}